var userData = _appConfigs.getUserData().userOrgs;
var communityName = userData.orgName;
//alert(communityName);
$('#laborCommunityGrid').datagrid({
	url:'collect/management/getLaborCommunityList',  
    queryParams:{
    	communityName:communityName
	},
    fit:true,
    fitColumns:true,
    singleSelect:true,
    columns:[[
              {field:'communityName', title:'社区名称', width:100, rowspan:3, align:'center', hidden:true},
              {field:'laborNumInAge', title:'户籍劳动年龄<br/>内人口总数', width:90, rowspan:3, align:'center'},
              {title:'目前状况', colspan:8, align:'center'}, 
              {field:'employedRate', title:'就业率', width:85, rowspan:3, align:'center'},
              {field:'companyRate', title:'单位就业率', width:85, rowspan:3, align:'center'}
            ],[
              {title:'就业人员情况', colspan:5, align:'center'},
              {field:'unJobPeople', title:'无业求职人员', width:90, rowspan:2, align:'center'},    
              {field:'undesirePeople', title:'无就业愿望人员', width:90, rowspan:2, align:'center'},
              {field:'loseTouchPeople', title:'失联人员', width:85, rowspan:2,align:'center'}
            ],[
              {field:'subTotal', title:'小计', width:85, align:'center'},    
              {field:'company', title:'单位就业', width:85, align:'center'},
              {field:'flexibleEmployed', title:'灵活就业', width:85, align:'center'},    
              {field:'selfEmployed', title:'自主创业', width:85, align:'center'},
              {field:'individualOperation', title:'个体经营', width:85, align:'center'}
            ]]
}); 

function exportLaborCommunityList(){
	debugger;
	var street,community;
	if(userData.porgId == _appConfigs.appOrgId){  //街道
		street = userData.orgId;
		community = "";
	}else if(userData.porgId != _appConfigs.appOrgId && userData.orgName.indexOf('社区')>=0){ //社区
		street = "";
		community = userData.orgId;
	}else{  //全部
		street = "";
		community = "";
	}
	window.location.href ="collect/excel/exportLaborCommunityCollect?communityName=" + communityName;
}
